#include "common.h"

enum Faction { Good, Indifferent, Evil };
enum Rules { Lawful, Unbiases, Anarchic };
enum Role { tank, healer, dps, kite, root };
enum State { curr, temp, bonus };
enum Stat { STR, DEX, CON, INT, SPI };
#define MAX_STAT 	25
#define STAT_POINTS	30
#define DEFAULT_STAT_BASE 8

class Player
{
public:
	Player();
	~Player();

	void 	PrintStat(uint8 *);
	void	SetStat(Stat s, uint8 c, uint8 t, uint8 b);
	uint8	GetStat(Stat s, State st);
	void	PrintPrimaryStats();
	void	RandomStats();

	Faction	GetFaction() { return faction; }
	Rules	GetRules() { return rules; }
	Role	GetRole() { return role; }
	char *	GetName() { return name; }

	void	SetFaction(Faction f) { faction = f; }
	void	SetRules (Rules r) { rules = r; }
	void	SetRole(Role r) { role = r; }
	void	SetName(const char * n);

	uint8	CalcBonus(uint8 a) { return (a-5)/2; }

	void	ID(byte i) { id = i; }
	byte	ID() { return id; }
	void	ADDXP(uint32 x) { xp += x; }
	void	HP(uint16 h) { hp = h; }
	uint16	HP() { return hp; }

	
private:
	uint8	str[3];
	uint8	dex[3];
	uint8	con[3];
	uint8	intl[3];
	uint8	spi[3];

	uint32	xp;
	uint16	hp;

	uint8	def[3];
	uint8	initiative;

	Faction	faction;	// Good, Indifferent, Evil
	Rules	rules;		// Lawful, Unbiases, Anarchic
	Role	role;		// tank, healer, dps, etc
	
	char *	name;
	byte	id;
};

